package com.bifrost.model.param;

import com.bifrost.validator.group.RoleAdd;
import com.bifrost.validator.group.RoleUpdate;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * Author by yanxiaobo
 * Date on 2018/4/18$.
 */
@Getter
@Setter
public class RoleParam {

    @NotNull(message = "更新角色时必须指定具体的角色",groups = {RoleUpdate.class})
    private Integer id;

    @NotBlank(message = "角色名称不能为空",groups = {RoleAdd.class, RoleUpdate.class})
    @Length(max = 255,message = "角色名称必须在255个字符以内",groups = {RoleAdd.class,RoleUpdate.class})
    private String roleName;

    @Length(max = 255,message = "角色名称必须在255个字符以内",groups = {RoleAdd.class,RoleUpdate.class})
    private String description;

}
